// pages/homeItem/homeItem.js
var t = getApp();

Component({
  properties: {
    com_data1: {
      type: Object,
      value: ""
    },
    com_data2: {
      type: Object,
      value: ""
    },
    com_data3: {
      type: Object,
      value: ""
    },
    com_data4: {
      type: Object,
      value: ""
    },
    nav_index:{
      type: Number,
      value: 0
    }
  },
  data: {
    typetexts:['节','月','季','期','年']
  },
  ready: function(){
    
  },
  methods: {
    // 
    nav_cour_detail:function(e){
      var index=this.properties.nav_index;
      var id=e.currentTarget.dataset.id;
      if(index==2){
        wx.navigateTo({
          url: '../../pages/groupCourse/groupCourse?id='+id
        })
      }else{
        wx.navigateTo({
          url: '../../pages/courseDetail/courseDetail?id='+id+'&status=1'
        })
      }
    },
  },
});